package de.breitbeil.jbooking.ui.dataview.columns;

import org.springframework.util.comparator.NullSafeComparator;

public class StringPropertyDataViewColumn extends DataViewColumnImpl {

    public StringPropertyDataViewColumn(String property) {
        this(property, true, true);
    }
    
    public StringPropertyDataViewColumn(String property, boolean addFilter, boolean addComparator) {
        super(property);
        
        if(addFilter) {
            setFilterProperties(new String[]{property});
        }
        if(addComparator) {
            setComparator(new NullSafeComparator(String.CASE_INSENSITIVE_ORDER, false));
        }
    }
    
}
